(function(){

    lucidctx.updateObservers = function()
    {
        document.getElementById('passcacheemptyBroadcaster').hidden = lucidapi.isPassphraseCacheEmpty();
        var data = lucidctx.getInvocationTarget();
        document.getElementById('encryptSelectionBroadcaster').hidden = (data) ? false : true;

        var decenabled = lucidapi.hasArmorType(data,"MESSAGE") ||
                         lucidapi.hasArmorType(data,"SIGNED MESSAGE") ||
                         lucidapi.hasArmorType(data,"SIGNATURE");
        document.getElementById('decryptSelectionBroadcaster').hidden = (decenabled) ? false : true;
        document.getElementById('verifySelectionBroadcaster').hidden = (decenabled) ? false : true;

        var impenabled = lucidapi.hasArmorType(data,"PRIVATE KEY BLOCK") ||
                         lucidapi.hasArmorType(data,"PUBLIC KEY BLOCK");
        document.getElementById('importSelectionBroadcaster').hidden = (impenabled) ? false : true;

    }

})();
